package lib.bone.nepudata.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

/**
 * @Author : kindear
 * @Date : 2021-12-31
 */
@Data
@Entity
@Table(name = "nepu_topic_task")
@EntityListeners(AuditingEntityListener.class)
@ApiModel(value = "纵向课题任务量")
public class NepuTopicTask {
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @ApiModelProperty(value = "纵向课题TaskID",name = "id")
    Long id;

    @ApiModelProperty("纵向课题ID")
    @Column(name = "topic_id")
    String topicId;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("工作量发放时间")
    @Column(name = "release_date")
    Date releaseDate;

    @ApiModelProperty(value = "发放状态",notes = "1是已经发放0是未发放")
    @Column(name = "status")
    Integer status;

    @ApiModelProperty("工作量")
    @Column(name = "workload")
    Integer workload;

    @CreatedDate
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "记录创建时间",name = "createdTime")
    @Column(name = "created_time")
    private Date createdTime;

    @LastModifiedDate
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "记录更新时间",name = "updatedTime")
    @Column(name = "updated_time")
    private Date updatedTime;
}
